sort an array alphabetically using the sort method